module.exports = app => {
  const mongoose = app.mongoose;
  const UserSchema = new mongoose.Schema({
    user: { type: String },
    passwd: { type: String },
    roles: [{
      type: mongoose.Schema.Types.ObjectId,
      ref: 'rbac_role',
    }],
  });

  return mongoose.model('rbac_user', UserSchema, 'rbac_user');
};
